<?php

namespace App\ModelFilters;


class UserGroupProductFilter extends BaseFilter
{
    /**
     * Related Models that have ModelFilters as well as the method on the ModelFilter
     * As [relationMethod => [input_key1, input_key2]].
     *
     * @var array
     */
    public $relations = [];


    public function product_id($value)
    {
        return $this->where('product_id', $value);
    }
    public function face_value($value)
    {
        return $this->related('spec', 'face_value', '=', $value);
    }


    public function spec_id($value)
    {
        return $this->where('spec_id', $value);
    }
    public function user_group_id($value)
    {
        return $this->where('user_group_id', $value);
    }


    public function isp($value)
    {
        return $this->related('product', 'isp', '=', $value);
    }
    public function type($value)
    {
        return $this->related('product', 'type', '=', $value);
    }
    public function channel_id($value)
    {
        return $this->related('channels', 'channel_id', '=', $value);
    }
    public function channel_group_id($value)
    {
        return $this->related('channel_group', 'id', '=', $value);
    }
}
